The present invention relates to a sensor arranged in a casing which is partly filled with a fluid and which comprises a rotatable shaft situated in the casing, where the sensor comprises a revolution counter sensor for measuring the revolutions of the shaft and also a temperature sensor for measuring the temperature of the fluid.